package client.comm.baoding.adapter.page

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter
import client.comm.baoding.fragment.*

class PendReleaseBalanceFragmentPageAdapter(fm: FragmentManager) : FragmentStatePagerAdapter(fm) {

    override fun getItem(position: Int): Fragment {

        return when (position) {
            0 -> PendReleaseBalanceOneFragment()
            1 -> PendReleaseBalanceTwoFragment()
//            2 -> HmjlThreeFragment()
//            3 -> HmjlFourFragment()
            else -> PendReleaseBalanceTwoFragment()
        }
    }

    override fun getCount(): Int {
        return 2
    }

    override fun getPageTitle(position: Int): CharSequence? {
        var title = ""

        when (position) {
            0 -> {
                title = "全部"
            }
            1 -> {
                title = "释放中"
            }
//            2 -> {
//                title = "释放中"
//            }
//            3 -> {
//                title = "已完成"
//            }
        }
        return title
    }
}